package com.tanhua.common.exception;

import com.tanhua.common.vo.ErrorResult;
import lombok.Data;

/**
 * Created with IntelliJ IDEA.
 *
 * @ClassName: BusinessException
 * @Author:王晨晗
 * @Description: 自定义异常类.统一处理可预知的异常
 * @Date: 2021/12/25/22:23
 */
@Data
public class BusinessException extends RuntimeException{


    private ErrorResult errorResult;

    public BusinessException(ErrorResult errorResult) {
        super(errorResult.getErrMessage());
        this.errorResult = errorResult;
    }
}
